package io.github.stary1993.kite.auth.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.github.stary1993.kite.mybatis.plus.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户表
 *
 * @author stary1993
 */
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
@Data
@Schema(description = "系统用户实体")
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    @Schema(description = "主键id")
    private Long userId;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 随机盐
     */
    @JsonIgnore
    @Schema(description = "随机盐")
    private String salt;


    /**
     * 0-正常，1-删除
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 锁定标记
     */
    @Schema(description = "锁定标记")
    private String lockFlag;

    /**
     * 手机号
     */
    @Schema(description = "手机号")
    private String phone;

    /**
     * 头像
     */
    @Schema(description = "头像地址")
    private String avatar;


    /**
     * 微信openid
     */
    @Schema(description = "微信openid")
    private String wxOpenid;

    /**
     * 微信小程序openId
     */
    @Schema(description = "微信小程序openid")
    private String miniOpenid;

    /**
     * QQ openid
     */
    @Schema(description = "QQ openid")
    private String qqOpenid;

    /**
     * 码云唯一标识
     */
    @Schema(description = "码云唯一标识")
    private String giteeLogin;

    /**
     * 开源中国唯一标识
     */
    @Schema(description = "开源中国唯一标识")
    private String oscId;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    private String name;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String email;

}
